<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0034)http://my.mtime.com/profile/basic/ -->
<html xmlns="http://www.w3.org/1999/xhtml" id="htmlTag">
<head id="head">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<title>基本信息 – 基本资料 – 电影社区 – Mtime时光网</title>
<link type="image/x-icon" href="../static/img/favicon.ico" rel="icon" />
<link type="image/x-icon" href="../static/img/favicon.ico" rel="shortcut icon" />
<link type="image/x-icon" href="../static/img/favicon.ico" rel="bookmark" />
<link type="application/opensearchdescription+xml" href="http://feed.mtime.com/opensearch.xml" title="Mtime影视搜索" rel="search" />
<link rel="alternate" type="application/rss+xml" title="影评" href="http://feed.mtime.com/comment.rss" />
<link rel="alternate" type="application/rss+xml" title="日志" href="http://feed.mtime.com/blog.rss" />
<link rel="alternate" type="application/rss+xml" title="资讯" href="http://feed.mtime.com/news.rss" />
<link rel="alternate" type="application/rss+xml" title="话题" href="http://feed.mtime.com/topic.rss" />
<link rel="alternate" type="application/rss+xml" title="周刊" href="http://feed.mtime.com/weekly.rss" />
<link href="../static/css/MyAccount/mytimeall.css" rel="stylesheet" type="text/css" />
<link href="../static/css/MyAccount/seting.css" rel="stylesheet" type="text/css" />
<link href="../static/css/MyAccount/mytime_replace.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../static/css/MyAccount/mtime-vip.css" />
<link rel="stylesheet" href="../static/js/layui/css/layui.css" media="all">
</head>
<body>
	<!--   <script type="text/javascript" src="./Userinfo _files/saved_resource"></script> -->
	<div id="topbar" pn="M16_HeadNav">
		<div page="123.html" id="frist"></div>
	</div>
	<div id="managerHistoryRegion"></div>
	<!--head -->
	<div id="div_cardgold" style="display: none"></div>
	<div id="M14_B_MyMtime_BannerTG"></div>
	<!--head end -->
	<div class="my_head">
		<div id="welcomeRegion">
			<h2>
				<a>个人设置</a><span
					class="px18 bold"><b class="hei">&middot;</b>基本资料</span>
			</h2>
		</div>
		<div id="headerBgRegion" class="i_pop"></div>
	</div>
	<div class="my_out clearfix">
		<!--MC导航-->
		<div class="my_nav clearfix">
			<ul>
				<li class="on"><a class="a1"
					href=""><span>基本资料</span></a></li>
			</ul>
		</div>
		<div class="t_blogout clearfix">
			<div class="o_h zoom">
				<!--基本信息导航-->
				<div class="t_setleft">
					<span>&nbsp;</span> <span>&nbsp;</span>
				</div>
				<div class="clearfix" id="x_phone">
					<div class="right_info_l1 fl m_data">
						<form id="infoForm">
							<p class="mt20">
								<span class="title1">登录手机</span> <input id="txt_mobile"
									type="text" class="w310" value=""
									disabled="disabled" /> <span class="ml9"><a
									id="ghPhone">更换手机</a></span>
							</p>
							<p class="mt20">
								<span class="title1">昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称</span>
								<input id="txt_nickname" type="text" class="w310" value=""
									disabled="disabled" /> <a id="a_changeNickname" class="ml9"
									href="javascript:void(0)">修改</a>
							</p>
							<div class="mt20">
								<img id="img_current" src=""
									class="mytime_user_photo" />
								<p class="mt20">当前头像</p>
								<div class="layui-upload">
									<button type="button" class="layui-btn" id="test1">上传图片</button>
									<button type="button" class="layui-btn" id="save">保存</button>
									<div class="layui-upload-list">
										<p id="demoText"></p>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!-- <div class="clearfix" style="display: none;" id="c_phone">
					<div class="right_info_l1 fl" id="actionRegion">
						<h4 class="yahei px20 pb15 normal">更换手机</h4>
						<div id="yzPhone">
							<dl class="get_mail" id="region1_changebind_mobile">
								<dd>
									<span class="title1">已绑定的手机</span><strong id="PhoneNum"
										class="px16"></strong> <a id="show_vcodeImage">更换手机</a>
								</dd>
							</dl>
						</div>
						<div id="region1_changebind">
							<dl class="get_mail">
								<dd id="region1_1" style="display: none;">
									<div id="v_container" style="width: 150px; height: 60px;"></div>
									<input id="shuaXin" type="button" value="刷新" />
								</dd>
								<dd id="region1_2" style="display: none;">
									<span class="title1">验证码</span> <input type="text"
										id="code_input" value="" placeholder="请输入验证码" />
								</dd>
								<span id="a1" style="color: #F00; display: none;">图片验证码错误</span>
								<dd id="region1_3" style="display: none;">
									<span class="title1">短信验证码</span> <input id="oldmobilecode"
										type="text" class="w60" style="width: 120px;"
										placeholder="短信验证码" /> <input type="button" value="获取短信验证码"
										class="btn_blue ml15" id="oldMobileCodeButton"
										onclick="clickButton(this)" />
								</dd>
								<span id="a2" style="color: #F00; display: none;">短信验证码错误</span>
								<dd id="region1_4" style="display: none;">
									<input id="changebind_verifycode_oldmobile_btn" type="button"
										class="btn_blue" value="验证手机">
								</dd>
							</dl>
						</div>
					</div> -->
						<div id="xgPhone">
							<dl class="get_mail" id="region2_changebind_mobile"
								style="display: none;">
								<!-- <dt>
									<p class="c_green bold px18 lh25 clearfix ml30">
										<span class="right2">&nbsp;</span>手机验证完成，绑定新手机号
									</p>
								</dt> -->
								<dd>
									<span class="title1">新手机号</span> <input id="newmobile"
										type="text" class="w295" value="" placeholder="常用手机号" />
										<input type="button" value="验证手机号"
										class="btn_blue ml15" id="verifyPhone"/>
									<p id="newmobileMsg" class="c_red mt3"></p>
								</dd>
								<dd>
									<span class="title1">短信验证码</span> <input id="newmobilecode"
										type="text" value="" class="w60" style="width: 120px;"
										placeholder="短信验证码" /> <input type="button" value="获取短信验证码"
										class="btn_blue ml15" id="newMobileCodeButton" onclick="clickButton(this)"/>
									<p id="newmobilecodeMsg" class="c_red mt3"></p>
								</dd>
								<dd>
									<input id="changebind_newmobile_verifycode_btn" type="button"
										class="btn_blue" value="更换">
								</dd>
							</dl>
						</div>
				</div>


			</div>
		</div>
	</div>
	<div id="bottom" style="">
		<div class="footout">
			<span class="topline"></span>
			<div class="footinner clearfix">
				<div class="fotlogo">
					<dl>
						<dt>
							<a href="http://www.mtime.com/" title="Mtime时光网">Mtime时光网</a>
						</dt>
						<dd class="clearfix">
							<a href="https://app.mokahr.com/apply/mtime">加入我们</a> <a
								href="http://feature.mtime.com/help/contact.htm" class="ml30">联系我们</a>
						</dd>
						<dd class="clearfix">
							<a href="http://group.mtime.com/help/">站务论坛</a> <a
								href="http://my.mtime.com/reportError/" class="ml30">问题反馈</a>
						</dd>
						<dd class="clearfix">
							<a href="http://feature.mtime.com/help/rules.htm">社区准则</a> <a
								href="http://www.mtime.com/sitemap.htm" class="ml30">网站地图</a>
						</dd>
						<dd class="clearfix">
							<a href="http://feature.mtime.com/help/privacy.htm">隐私政策</a> <a
								href="http://en.mtime.com/" class="ml30">English</a>
						</dd>
					</dl>
					<i class="line"></i>
				</div>
				<div class="fotmap">
					<dl style="width: 42px;">
						<dt>栏目</dt>
						<dd>
							<a href="http://news.mtime.com/">新闻</a>
						</dd>
						<dd>
							<a href="http://theater.mtime.com/">影院</a>
						</dd>
						<dd>
							<a href="http://mall.mtime.com/">商城</a>
						</dd>
						<dd>
							<a href="http://www.mtime.com/community/">社区</a>
						</dd>
					</dl>
					<dl style="width: 185px;">
						<dt>推荐</dt>
						<dd>
							<a href="http://movie.mtime.com/recent/">观影指南</a> <a
								href="http://movie.mtime.com/boxoffice/" class="ml30">电影票房</a>
						</dd>
						<dd>
							<a href="http://news.mtime.com/conversation/">时光对话</a> <a
								href="http://video.mtime.com/search/?h=video&amp;s=2&amp;t=%E9%A2%84%E5%91%8A%E7%89%87"
								class="ml30">新片预告</a>
						</dd>
						<dd>
							<a href="http://movie.mtime.com/all/list/index.html">特色榜单</a> <a
								href="http://my.mtime.com/app/quiz/" class="ml30">电影猜猜猜</a>
						</dd>
						<dd>
							<a href="http://news.mtime.com/fun/">全球拾趣</a> <a
								href="http://my.mtime.com/app/card/" class="ml30">卡片大富翁</a>
						</dd>
					</dl>
					<dl>
						<dt>关注我们</dt>
						<dd>
							<a
								href="http://weibo.com/movietime?topnav=1&amp;wvr=5&amp;topsug=1"
								target="_blank" class="sina" title="新浪">新浪</a>
						</dd>
						<dd>
							<a id="aWeiXinPicButton" href="javascript:void(0)" class="weixin"
								title="微信">微信</a>
						</dd>
						<dd>
							<a href="http://www.mtime.com/rss/" target="_blank" class="rss"
								title="RSS">RSS</a>
						</dd>
					</dl>
					<i class="line"></i>
					<div id="divWeiXinPicContainer" class="my_layer"
						style="display: none;">
						<em class="l_arrow">&nbsp;</em>
						<div class="inner p15" style="width: 195px;">
							<i></i>
							<p>扫描二维码，微信实时关注时光网</p>
						</div>
					</div>
				</div>
				<div class="fotweek">
					<dl>
						<dt class="clearfix">
							<span class="fr">第212期</span> <strong>时光周刊</strong>
						</dt>
						<dd>
							<a href="http://www.mtime.com/weekly/" target="_blank"
								title="时光周刊"><img src="../static/img/155934.32319019_o.jpg"
								width="170" alt="时光周刊" /></a>
						</dd>
						<dd class="input">
							<input id="iptEMail" type="text" value="邮箱地址" class="c_a5" /> <a
								id="btnSubscribe" href="javascript:void(0)">订阅</a>
						</dd>
					</dl>
				</div>
				<div class="fothr">
					<dl>
						<dt>
							<strong>手机购票</strong> 方便 实惠
						</dt>
						<dd>
							<a href="http://feature.mtime.com/mobile/" target="_blank"><i></i></a>
						</dd>
						<dd>扫描二维码 下载客户端</dd>
					</dl>
				</div>
			</div>
		</div>
		<div class="db_foot">
			<p>
				<span class="mr12">北京动艺时光网络科技有限公司</span>Copyright 2006-2018
				Mtime.com Inc. All rights reserved.<br /> <a
					href="http://feature.mtime.com/help/icp.htm" target="_blank"
					class="mr12 ml12">京ICP证050715号</a> <a
					href="http://feature.mtime.com/help/videolicence.htm"
					target="_blank" class="mr12">网络视听许可证0108265号</a><a
					href="http://feature.mtime.com/help/network.htm" target="_blank"
					class="mr12">网络文化经营许可证</a><a
					href="http://feature.mtime.com/help/tvlicence.htm" target="_blank"
					class="mr12">广播电视节目制作经营许可证(京)字第1435号</a><span>京公网安备：110105000744
					号</span>
			</p>
			<div class="credible">
				<a href="http://feature.mtime.com/help/credible.htm" target="_blank"
					title="可信网站" class="credibler"></a> <a
					href="http://feature.mtime.com/help/goodfaith.htm" target="_blank"
					title="诚信网站" class="goodfaith"></a>
			</div>
		</div>
	</div>
	<div id="contentEnd">
		<embed type="application/x-shockwave-flash"
			src="http://static1.mtime.cn/20180730161010/flash/MtimeCallback.swf?rnd=490326315"
			width="1" height="1" id="flashCallback" name="flashCallback"
			quality="high" menu="false" allowfullscreen="false"
			allowscriptaccess="always" wmode="transparent" />
		<div style="zoom: 1;">
			<div class="eject_outer" style="display: none">
				<div class="eject" style="width: 280px;">
					<p class="directiontag"></p>
					<p class="c_666">签名将在你回复群组话题、日志、照片博客时出现。</p>
				</div>
			</div>
		</div>
		<div style="zoom: 1;">
			<div class="eject_outer" style="display: none">
				<div class="eject" style="width: 280px;">
					<p class="directiontag"></p>
					<p class="c_666">介绍将在你的个人微评页面、个人博客页面出现。</p>
				</div>
			</div>
		</div>
	</div>

	<script type="text/javascript" src="../assets/js/jquery-1.8.3.min.js"></script>
	<script src="../static/js/gVerify.js"></script>
	<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="../static/js/layer/layer.js"></script>
	<script type="text/javascript" src="../static/js/layui/layui.js"></script>
	<script type="text/javascript" src="../static/js/jquery-3.3.1.js"></script>
	<!-- 鼠标移到图标和移出图标 -->
	<script type="text/javascript">
	$(function() {
		frist();
		setUserName();
		insertPhone();
		insertNickname();
		insertPic();
	});
		//引入首栏方法
		function frist() {
			var liftPage = $("#frist").attr("page");
			$("#frist").load(liftPage);
		};
		//更改手机号方法
		function insertPhone() {
			$("#ghPhone").click(function() {
				$("#x_phone").hide();
				$("#xgPhone dl").show();
				XgPhone();//修改手机号
			});
		}
		//更改昵称方法
		function insertNickname(){
			$("#a_changeNickname").click(function() {
				$("#txt_nickname").attr("disabled",false);
			});
		}
		
		
/* 
		function hideLoginBox() {
			document.getElementById("my_headtip_id").style.display = "none";

		}

		function showLoginBox() {
			document.getElementById("my_headtip_id").style.display = "block";

		} */
		
		var oldPhone;
		var newPhone;

		//获取传过的userName
		function setUserName() {
			var request = { 
				QueryString : function(val) { 
				var uri = window.location.search; 
				var re = new RegExp("" +val+ "\=([^\&\?]*)", "ig"); 
				return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null); 
				}
			}
			 
			var userName = request.QueryString("userName");
			var nickName = decodeURI(request.QueryString("nickName"));
			var headPortrait = request.QueryString("headPortrait");
			$("#txt_mobile").val(userName);
			$("#PhoneNum").html(userName);
			$("#txt_nickname").val(nickName);
			$('#img_current').attr('src', headPortrait);
			oldPhone=$("#txt_mobile").val();
			
		}
		
		//修改手机号
		function XgPhone() {
			var code;
			var newPhone;
			var users;
			$("#verifyPhone").click(function(){
				newPhone = $("#newmobile").val();
				if (newPhone.length == 0) {
					layer.msg("请输入手机号")
				} else if (newPhone.length != 11) {
					layer.msg("请输入正确的手机号")
				}else{
					$.ajax({
						url : "/moviesMaven/user/selectPhone.htm",
						type : "post",
						data : {"phone":newPhone},
						dataType : "json",
						success : function(data) {
							if (data.success) {
								layer.msg(data.message);
								$("#newMobileCodeButton").click(function() {
									$("#newMobileCodeButton").attr('onclick');
									newPhone = $("#newmobile").val();
									$.ajax({
										url : "/moviesMaven/user/sendMsg.htm",
										type : "post",
										data : {"phone":newPhone},
										dataType : "json",
										success : function(data) {
											layer.msg(data.message);
											code = data.code;
										},
									});
								});
							} else {
								layer.msg(data.message);
							}
						},
					});
				}
			})	
				

			$("#changebind_newmobile_verifycode_btn").click(function() {//点击更换
				
				var newMobileCode = $("#newmobilecode").val();
				if (newMobileCode == code) {
					layer.msg("手机号修改成功！");
					$("#txt_mobile").val(newPhone);
					$("#x_phone").show();
					$("#xgPhone dl").hide();
				} else {
					alert("手机号修改失败，请重新输入验证码！");
				}
			});

		}
		
		//修改头像方法
		function insertPic(){
			var url;
			layui.use('upload', function(){
			  var $ = layui.jquery
			  ,upload = layui.upload;
			  
			  //普通图片上传
			  var uploadInst = upload.render({
			    elem: '#test1'
			    ,url: '/moviesMaven/user/upload.htm'
			    ,before: function(obj){
			      //预读本地文件示例，不支持ie8
			      obj.preview(function(index, file, result){
			        $('#img_current').attr('src', result); //图片链接（base64）
			      });
			    }
			    ,done: function(res){
			      //如果上传失败
			      if(res.code > 0){
			        return layer.msg('上传失败');
			      }
			      //获取图片存储的路径
			      url = res.file;
			      layer.msg("图片上传成功！");
			      //上传成功
			    }
			    ,error: function(){
			      //演示失败状态，并实现重传
			      var demoText = $('#demoText');
			      demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
			      demoText.find('.demo-reload').on('click', function(){
			        uploadInst.upload();
			      });
			    }
			  });
			});
			
			
			$("#save").click(function() {
				newPhone = $("#txt_mobile").val();
				var name = $("#txt_nickname").val();
				
				$.ajax({
					url : "/moviesMaven/user/savePic.htm",
					type : "post",
					data : { "newPhone" : newPhone,"nickName":name,"url":url,"oldPhone":oldPhone},
					dataType : "json",
					success : function(data) {
						layer.msg(data.message);
						setTimeout(function () {
							$.ajax({
								url:"/moviesMaven/userOut.htm",
								dataType:"json",
								success:function(data){
									$(location).attr('href', 'login.html');
								}
							})
			            }, 3000);
					},
				});
				//$(location).attr('href', 'login.html');
			});
			
		}

		//短信验证倒计时
		function clickButton(obj) {
			var obj = $(obj);
			obj.attr("disabled", "disabled");
			var time = 60;
			var set = setInterval(function() {
				obj.val((--time) + "秒后重新获取");
			}, 1000);
			setTimeout(function() {
				obj.attr("disabled", false).val("获取短信验证码");
				clearInterval(set);
			}, 60000);
		}
		
		
	</script>

</body>
</html>